package com.designed.pattern.behavioral.observer;

/**
 * @author yifei
 * @description
 * @date 2024/1/11
 **/
public class Test {
    public static void main(String[] args) {
        Subject subject = new Subject();

        new HexObserver(subject);
        new BinaryObserver(subject);

        System.out.println("状态值为 : 15");
        subject.setState(15);

        System.out.println("状态值为 : 8");
        subject.setState(8);

    }
}
